package com.server.message;

import com.comm.result.ResponseResult;
import lombok.extern.slf4j.Slf4j;

/**
 * @Description: TODO rabbit mq 消息处理
 * @Author: mis_wu
 * @Date: 2022/7/30
 **/
@Slf4j
public class RabbitMqMsgHandle {

    private static Object receiveRabbitMq;

    /**
     * 存放消息
     * @param object object
     */
    public static void setReceiveMessage(Object object){
        receiveRabbitMq = object;
        log.info("消息处理:{}",receiveRabbitMq);
        // TODO 或者将消息存到redis中,设置过期时间
    }

    /**
     * 获取消费者消息
     */
    public static ResponseResult<Object> getReceiveMessage(){
        log.info("消费者 获取消息 ...");
        return ResponseResult.isSuccess(receiveRabbitMq);
    }

}
